package golf.stockinfo.buysellsimulation;

import java.util.TreeMap;

import com.carrotsearch.hppc.LongObjectMap;
import com.carrotsearch.hppc.LongObjectOpenHashMap;

public class GlobalCache {
	
	private static TreeMap<Object, Object> cache = new TreeMap<Object, Object>();
//	private static TreeMap<Long, Object> cacheLong = new TreeMap<Long, Object>();
	private static LongObjectMap<Object> cacheLong = new LongObjectOpenHashMap<Object>();
	
	public static Object getCache(Object key){
		return cache.get(key);
	}
	
	public static Object getCache(long key){
		return cacheLong.get(key);
	}
	
	public static void addCache(Object key, Object obj){
		cache.put(key, obj);
	}
	
	public static void addCache(long key, Object obj){
		cacheLong.put(key, obj);
	}
	
	public static void clearCache(){
		cache.clear();
	}

}
